package cn.janescott.inner.space.data.system.entity;

import cn.janescott.inner.space.data.DataEnums;
import cn.janescott.inner.space.lib.dto.BaseEntity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 账户状态
 *
 * @author scott
 * @date 2018/7/27
 */
@Entity
@Table(name = "ACCOUNT_STATUS")
public class AccountStatus extends BaseEntity {

    @Id
    @Column(name = "USER_ID")
    private Long userId;

    /**
     * 是否锁定用户
     */
    @Column(name = "LOCKED")
    private DataEnums.LockedEnums locked;

    /**
     * 锁定原因
     */
    @Column(name = "LOCK_REASON")
    private String lockReason;

    /**
     * 禁止登录时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "FROZEN")
    private Date frozen;

    /**
     * 禁止登录原因
     */
    @Column(name = "FROZEN_REASON")
    private String frozenReason;

    /**
     * 一号多登限制
     */
    @Column(name = "SHARES")
    private Integer shares;

    @Override
    public Serializable getId() {
        return userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public DataEnums.LockedEnums getLocked() {
        return locked;
    }

    public void setLocked(DataEnums.LockedEnums locked) {
        this.locked = locked;
    }

    public String getLockReason() {
        return lockReason;
    }

    public void setLockReason(String lockReason) {
        this.lockReason = lockReason;
    }

    public Date getFrozen() {
        return frozen;
    }

    public void setFrozen(Date frozen) {
        this.frozen = frozen;
    }

    public String getFrozenReason() {
        return frozenReason;
    }

    public void setFrozenReason(String frozenReason) {
        this.frozenReason = frozenReason;
    }

    public Integer getShares() {
        return shares;
    }

    public void setShares(Integer shares) {
        this.shares = shares;
    }
}
